
<style>
    body {
        overflow: scroll;
    }
    .html{
        padding: 0 0 0 0 !important;
    }
    .column-text{
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .column-classify-title{
        width: 300px;
        max-width: 300px;
    }
    .column-classify-season{
        width: 60px;
        line-height: 45px;
    }
    .column-sku-psku_code{
        width: 70px;
        line-height: 45px;
    }
    .column-sku-m_psku_id{
        width: 70px;
        line-height: 45px;
    }
    .column-sku-psku_cn{
        width: 350px;
        max-width: 350px;
        line-height: 45px;
    }
    .column-instant_num{
        width: 72px;
        line-height: 45px;
    }
    .column-transit_num{
        width: 72px;
        line-height: 45px;
    }
    .column-instant_num1{
        width: 80px;
        line-height: 45px;
    }
    .column-transit_num1{
        width: 80px;
        display: table-cell;
        line-height: 45px;
    }

    .pickup-span{
        padding: 1px;
        width: 20%;
        display: inline-block;
        border: 1px #f4f4f4 solid;
    }
</style>

<div>
    <table class="table table-hover grid-table">
        <thead>
        <tr>
            <th class="column-classify-title column-text">品类</th>
            <th class="column-classify-season">季节性</th>
            <th class="column-sku-psku_code">SKU</th>
            <th class="column-sku-m_psku_id">主SKU</th>
            <th class="column-sku-psku_cn column-text">SKU名称</th>
            <th class="column-instant_num">在库数量</th>
            <th class="column-transit_num">在途数量</th>
            <th class="column-instant_num1">在库数量1</th>
            <th class="column-transit_num1">在途数量1</th>
            @for($i = 0; $i < App\Models\SsBasic\StockupAreaSkuEstimate::NEW_ESTIMATE_NUM; $i++)
                <th class="column-pickup{{$i}}">{{ date('y/m',strtotime("midnight first day of $i month")) }}</th>
            @endfor
            <th>差异数</th>
            <th>操作人</th>
        </tr>
        </thead>

        <!--classifySku-->
        @foreach($classifySku as $row)
            <tr>
                <td class="column-classify-title column-text" style="padding-top: 30px;"></td>
                <td class="column-classify-season" style="vertical-align: middle;">{{  App\Models\Product\ProductClassify::$_season[$row->classify->season] }}</td>
                <td class="column-sku-psku_code" style="vertical-align: middle;">{{ $row->sku->psku_code }}</td>
                <td class="column-sku-m_psku_id" style="vertical-align: middle;">{{ App\Models\Product\ProductSku::getValueById($row->sku->m_psku_id, 'psku_code') }}</td>
                <td class="column-sku-psku_cn column-text" style="line-height: 50px;" title="{{ $row->sku->psku_cn ?? '' }}">{{ $row->sku->psku_cn }}</td>
                <td class="column-instant_num" style="vertical-align: middle;">{{ $row->cn_instant_num ?? 0 }}</td>
                <td class="column-transit_num" style="vertical-align: middle;">{{ $row->cn_transit_num ?? 0 }}</td>
                <td class="column-instant_num1" style="vertical-align: middle;">{{ $row->instant_num1 ?? 0 }}</td>
                <td class="column-transit_num1" style="vertical-align: middle;">{{ $row->transit_num1 ?? 0 }}</td>

                @for($i = 0; $i < App\Models\SsBasic\StockupAreaSkuEstimate::NEW_ESTIMATE_NUM; $i++)
                <td class="column-pickup{{$i}}" style="border-right: 2px #ddd solid;">
                    <div>
                        <span class="pickup-span">提货数量</span>
                        <span class="pickup-span">实时数量</span>
                        <span class="pickup-span">异常标记</span>
                        <span class="pickup-span">发货数量</span>
                        <span class="pickup-span">发货箱数</span>
                    </div>
                    <div>
                        <span class="pickup-span" title="{{ $i }}">{{ $i }}</span>
                        <span class="pickup-span" title="{{ $i }}">{{ $i }}</span>
                        <span class="pickup-span" title="{{ $i }}" style="color: red;">
                            {{ $row->instant_num1 - $row->instant_num ?? 0 }}
                        </span>
                        <span class="pickup-span" title="{{ $i }}">{{ $i }}</span>
                        <span class="pickup-span" title="{{ $i }}">{{ $i }}</span>
                    </div>
                </td>
                @endfor
                <td style="vertical-align: middle;">{{ $row->diff_num ?? 0 }}</td>
                <td style="vertical-align: middle;">{{ \App\Util\User::getUsernameById($row->seller_id) }}</td>
            </tr>
        @endforeach

    </table>
</div>
